package com.atguigu.principle.singleresponsibility.absfactory.pizzastore.order;

import com.atguigu.principle.singleresponsibility.factorymethod.pizzastore.pizza.BJCheesePizza;
import com.atguigu.principle.singleresponsibility.factorymethod.pizzastore.pizza.BJPepperPizza;
import com.atguigu.principle.singleresponsibility.factorymethod.pizzastore.pizza.LDCheesePizza;
import com.atguigu.principle.singleresponsibility.factorymethod.pizzastore.pizza.Pizza;

/**
 * @Author: yangtao
 * @Description:
 */
public class LDFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new LDCheesePizza();

        } else if (orderType.equals("pepper")) {
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
    }

